//
//  SHComposeButtonInfo.swift
//  SHWeibo
//
//  Created by jingming wang on 16/8/4.
//  Copyright © 2016年 cpy.name. All rights reserved.
//

import UIKit

class SHComposeButtonInfo: NSObject {
    // 供外界调用
    class func buttonInfos() -> ([SHComposeButtonInfo]) {
        let path = NSBundle.mainBundle().pathForResource("compose.plist", ofType: nil)!
        let array = NSArray(contentsOfFile: path)!
        var tempArr: [SHComposeButtonInfo] = [SHComposeButtonInfo]()
        
        for value in array {
            let composeButtonInfo = SHComposeButtonInfo.modelWithDict(value as! [String : AnyObject])
            tempArr.append(composeButtonInfo)
        }
        return tempArr

    }
    
    var icon: String?
    var title: String?
    var nextvc: String?
    
    class func modelWithDict(dict: [String: AnyObject]) -> (SHComposeButtonInfo) {
        let composeButtonInfo: SHComposeButtonInfo = SHComposeButtonInfo.init(dict: dict)
        return composeButtonInfo
    }
    
    init(dict: [String: AnyObject]) {
        super.init()
        
        setValuesForKeysWithDictionary(dict)
    }
    
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }

}
